<script>on returninFieldglobal brokenif broken = 1 thenclick at loc of bg btn id 6elseselect text of bg fld "Speed1"end ifend returninField</script>
</part>
<part>
<id>5</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>109</left>
<top>41</top>
<right>147</right>
<bottom>58</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Speed1</name>
<script>on returninFieldclick at loc of bg btn ID 6end returninField</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>13</left>
<top>64</top>
<right>148</right>
<bottom>86</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>italic</textStyle>
<name>Fire!</name>
<script>on mouseUpglobal Bx, By, Tx, Ty, g, broken, air, barrier, walhi, wall, blow, ¬wind, fireSound, missSound, missNotes, missTicon, hostile, ¬targIcon, move, targHeightput wind * (blow + the random of 20 - the random of 20) into blowput 0 into tput bg fld "Angle1" into degif deg >90 or deg < -90 thenanswer "Launch angle must be between -90° and 90°"select text of bg fld "Angle1"exit mouseUpend ifput deg*pi/180 into radput bg fld "Speed1" into Voif Vo < 1 thenanswer "The launch speed must be at least 1m/s"select text of bg fld "Speed1"exit mouseUpend ifif Vo > 200*sqrt(g/9.8) thenanswer "The launch speed must be less than " &¬round(200 * sqrt(g/9.8)) &"m/s"select text of bg fld "Speed1"exit mouseUpend ifput deg*pi/180 into radput bg fld "Speed1" into Voput Vo*cos(rad) into Vxput Vo*sin(rad) into Vyput Bx into xPut By into yput 30/Vo into dtplay fireSoundset hilite of cd btn "Base" to trueset hilite of cd btn "Base" to falseset brush to 7set pattern to 12repeat until y > 320 or y < -1000 or x > 512choose brush toolput round (x) into xput round (y) into yclick at x,yif barrier = 1 and x > 240 and x < 280 and y > walhi thenexit repeatend ifif the clickLoc is within the rect of cd btn "Target" thenyouWinexit mouseUpend ifif Vx > 5 then subtract Vx*air*dt from Vxput Bx + Vx * t + blow * t into xsubtract g * dt from Vyif Vy > 0 then subtract Vy*air*dt from Vy else add Vy*air*dt to Vyput By - Vy * t into yadd dt to tend repeatset icon of cd btn "Target" to missTiconplay missSound tempo 200 missNotesclearPaint2set icon of cd btn "Target" to targIconif broken < 2 thenselect text of bg fld "Angle2"else select text of bg fld "Speed2"player2sTurnif move = 1 thenput the random of 200 into Txput 300 + Tx into Txif targHeight = 1 thenput the random of 100 + 200 into Tyelse put 300 into Tyset loc of cd btn "Target" to Tx, Tyif broken < 2 thenselect text of bg fld "Angle2"else select text of bg fld "Speed2"end ifend mouseUp</script>
</part>
<part>
<id>7</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>461</left>
<top>41</top>
<right>499</right>
<bottom>58</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Speed2</name>
<script>on returninFieldclick at loc of bg btn ID 9end returninField</script>
</part>
<part>
<id>8</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>461</left>
<top>21</top>
<right>499</right>
<bottom>38</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Angle2</name>
<script>on returninFieldglobal brokenif broken = 1 thenclick at loc of bg btn id 9elseselect text of bg fld "Speed2"end ifend returninField</script>
</part>
<part>
<id>9</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>364</left>
<top>64</top>
<right>500</right>
<bottom>86</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>italic</textStyle>
<name>Fire!</name>
<script>on mouseUpglobal Bx, By, Tx, Ty, g, broken, air, barrier, walhi, wall, blow, ¬wind, fireSound, missSound, missNotes, missBicon, hostile, ¬baseIcon, move, baseHeightput wind * the random of 20 into blowput 0 into tput bg fld "Angle2" into degif deg >90 or deg < -90 thenanswer "Launch angle must be between -90° and 90°"select text of bg fld "Angle2"exit mouseUpend ifput deg*pi/180 into radput bg fld "Speed2" into Voif Vo < 1 thenanswer "The launch speed must be at least 1m/s"select text of bg fld "Speed2"exit mouseUpend ifif Vo > 200*sqrt(g/9.8) thenanswer "The launch speed must be less than "& ¬round(200*sqrt(g/9.8))&"m/s"select text of bg fld "Speed2"exit mouseUpend ifput deg*pi/180 into radput bg fld "Speed2" into Voput Vo*cos(rad) into Vxput Vo*sin(rad) into Vyput Tx into xPut Ty into yput 30/Vo into dtplay fireSoundset hilite of cd btn "Target" to trueset hilite of cd btn "Target" to falseset brush to 7set pattern to 12repeat until y > 300 or y < -1000 or x < 0choose brush toolput round (x) into xput round (y) into yclick at x,yif barrier = 1 and x > 240 and x < 280 and y > walhi thenexit repeatend ifif the clickLoc is within the rect of cd btn "Base" thentheyWinexit mouseUpend ifif Vx > 5 then subtract Vx*air*dt from Vxput Tx - Vx * t + blow * t into xsubtract g * dt from Vyif Vy > 0 then subtract Vy*air*dt from Vy else add Vy*air*dt to Vyput Ty - Vy * t into yadd dt to tend repeatset icon of cd btn "Base" to missBiconplay missSound tempo 200 missNotesclearPaint2set icon of cd btn "Base" to baseIconif broken < 2 thenselect text of bg fld "Angle1"else select text of bg fld "Speed1"player1sTurnif move = 1 thenput the random of 200 into Bxif baseHeight = 1 thenput the random of 100 + 200 into Byelse put 300 into Byset loc of cd btn "Base" to Bx, Byif broken < 2 thenselect text of bg fld "Angle1"else select text of bg fld "Speed1"end ifend mouseUp</script>
</part>
<part>
<id>10</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>236</left>
<top>21</top>
<right>277</right>
<bottom>40</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>Truce!</name>
<script>on mouseUpanswer "Do both players agree to the truce?" with "No" or "Yes"if it is "Yes" then answer "Reconfigure here or return to settings?"¬with "Here" or "Settings" else exit mouseUpif it is "Here" then openCard else go to bg "Game Settings"end mouseUp</script>
</part>
<name>2 Player</name>
<script>on player1sTurnglobal brokenif broken = 0 or broken = 1 then select text of bg fld "Angle1"if broken = 2 then select text of bg fld "Speed1"end player1sTurnon player2sTurnglobal brokenif broken = 0 or broken = 1 then select text of bg fld "Angle2"if broken = 2 then select text of bg fld "Speed2"end player2sTurnon closeBackgroundlock screenset the lockText of bg fld "Angle1" to falseput empty into bg fld "Angle1"set the lockText of bg fld "Speed1" to falseput empty into bg fld "Speed1"set the lockText of bg fld "Angle2" to falseput empty into bg fld "Angle2"set the lockText of bg fld "Speed2" to falseput empty into bg fld "Speed2"clearPaint2clearTargetsdoMenu "Background"choose select tooldrag from 240,0 to 270,342doMenu "Clear Picture"choose rectangle toolset filled to trueset pattern to 12set lineSize to 1drag from 0,309 to 512, 342set pattern to 13drag from 240,308 to 270, 0 with optionKeydoMenu "Background"unlock screenchoose browse toolend closeBackgroundon openCardglobal thing, Bx, By, Tx, Ty, air, barrier, walhi, broken, ¬baseIcon, targIcon, targHeight, baseHeight, blowlock screenput the random of 20 -the random of 20 into blowput empty into bg fld "Speed1"if broken = 1 thenput 120 + the random of 80 into bg fld "Speed1"set the lockText of bg fld "Speed1" to trueend ifput empty into bg fld "Angle1"if broken = 2 thenput 40 + the random of 40 into bg fld "Angle1"set the lockText of bg fld "Angle1" to trueend ifput empty into bg fld "Speed2"if broken = 1 thenput 120 + the random of 80 into bg fld "Speed2"set the lockText of bg fld "Speed2" to trueend ifput empty into bg fld "Angle2"if broken = 2 thenput 40 + the random of 40 into bg fld "Angle2"set the lockText of bg fld "Angle2" to trueend ifchoose browse tooldoMenu "New Button"setTargetset icon of thing to baseIconput the random of 100 into Bxif baseHeight = 1 thenput 200 + random (100) into Byelse put 300 into Byset loc of thing to Bx, Byset the name of thing to "Base"put the random of 200 into Txput 300 + Tx into Txif targHeight = 1 thenput 200 + random (100) into Tyelse put 300 into TydoMenu "New Button"setTargetset icon of thing to targIconset loc of thing to Tx, Tyset name of thing to "Target"if barrier = 1 thendoMenu "Background"choose brush toolset brush to 5set pattern to 12put the random of 180 into wallput 100 + wall into walhidrag from 256,342 to 256,walhidoMenu "Background"end ifunlock screenchoose browse toolclick at loc of bg fld "Angle1"if broken = 2 then select text of bg fld "Speed1"end openCardon youWinglobal killSound, killIcon, killNotes, winPhrase, Yes, Noplay killSound tempo 200 killNotesset icon of cd btn "Target" to killIconrepeat with i = 0 to 9set hilite of cd btn "Target" to trueset hilite of cd btn "Target" to falseend repeatwait 3 secondsanswer winPhrase with Yes or Noif it is Yes thenlock screenclearPaint2clearTargetsdoMenu "Background"choose select tooldrag from 240,0 to 270,342doMenu "Clear Picture"choose rectangle toolset filled to trueset pattern to 12set lineSize to 1drag from 0,309 to 512, 342set pattern to 13drag from 240,308 to 270, 0 with optionKeydoMenu "Background"unlock screenopenCardexit youWinelse go to bg "Game Settings"end youWinon theyWinglobal dieSound, dieIcon, dieNotes, losePhrase, Yes, Noplay dieSound tempo 200 dieNotesset icon of cd btn "Base" to dieIconflash 10wait 3 secondsanswer losePhrase with Yes or Noif it is Yes thenlock screenclearPaint2clearTargetsdoMenu "Background"choose select tooldrag from 240,0 to 270,342doMenu "Clear Picture"choose rectangle toolset filled to trueset pattern to 12set lineSize to 1drag from 0,309 to 512, 342set pattern to 13drag from 240,308 to 270, 0 with optionKeydoMenu "Background"unlock screenopenCardexit theyWinelse go to bg "Game Settings"end theyWin</script>